package com.ruoyi.project.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import com.ruoyi.framework.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 系统目录树
 * </p>
 *
 * @author luaj
 * @since 2019-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SysDirTree对象", description="系统目录树")
public class SysDirTree extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "dir_id", type = IdType.AUTO)
    private Long dirId;

    @ApiModelProperty(value = "父id")
    private Long parentId;

    /** 祖级列表 */
    private String ancestors;

    private Integer orderNum;

    @ApiModelProperty(value = "目录名称")
    @TableField(condition = SqlCondition.LIKE)
    private String dirName;

    @ApiModelProperty(value = "目录类别")
    private Integer dirType;

    private Integer status;

    @TableField(exist = false)
    private List<SysDirTree> children;


}
